package com.aishang.shopback_2005.controller;

import com.aishang.shopback_2005.po.Category;
import com.aishang.shopback_2005.po.Categorysecond;
import com.aishang.shopback_2005.service.CategoryService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author a1790
 */
@RestController
@RequestMapping("/category")
public class CategoryController {
    @Resource
    private CategoryService categoryService;
    @RequestMapping("/getCategories")
    public List<Category> getCategories(){
        return categoryService.getCategories();
    }
    @RequestMapping("/getCategortSeconds")
    public List<Categorysecond> getCategortSeconds(Integer cid){
        return categoryService.getCategortSeconds(cid);
    }
}
